package com.xuecheng.checkcode.domain.model.dto;

import lombok.Data;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-09-08  09:34
 */
@Data
public class CheckResult {

    private Boolean flag;

    private Integer type;

    public CheckResult(Boolean flag, Integer type) {
        this.flag = flag;
        this.type = type;
    }

    public static CheckResult success(){
        return new CheckResult(true, null);
    }

    public static CheckResult error(Integer type){
        return new CheckResult(false, type);
    }
}
